import tkinter as tk

root = tk.Tk()
btn1 = tk.Button(root, text="按钮1")
btn2 = tk.Button(root, text="按钮2")
btn1.pack(side="left")  # 左对齐
btn2.pack(side="right") # 右对齐
root.mainloop()